package person.bangbang.im.Androidgin.Framework;

import java.util.ArrayList;
import java.util.List;

/** 
 * Specification about a concrete protocol.
 * so we can get protocol info before loading it.
 * 
 * @author bangbang.song@gmail.com
 */
public class ProtocolSpec {
	
	/**
	 * no icon res 
	 */
	public static final int ICON_ID_NULL = -1;
	/**
	 * use default res.
	 */
	public static final int ICON_ID_DEFAULT = 0;
	/**
	 * res/drawable
	 * default to ICON_ID_DEFAULT
	 */
	private int mIcon;
	/**
	 * protocol's id
	 */
	private String mId;
	/**
	 * a StatusType list a protocol can set.
	 */
	private List<StatusType> mStatus = new ArrayList<StatusType>();
	
	public ProtocolSpec(int icon, String id, StatusType[] array) {
		mIcon = icon;
		mId = id;
		
		int l = array.length;
		for (int i = 0 ; i < l ; i++) {
			mStatus.add(array[i]);
		}
	}
	
	public String getId() {
		return mId;
	}
	
	public int getIcon() {
		return mIcon;
	}
	
	public List<StatusType> getStatus() {
		return mStatus;
	}
}
